package cn.hsa.xxx.bookOrder.service.impl;

import cn.hsa.hsaf.core.framework.web.HsafRestPath;
import cn.hsa.xxx.bookOrder.bo.OrderDetailsBO;
import cn.hsa.xxx.bookOrder.dto.OrderDetailsDTO;
import cn.hsa.xxx.bookOrder.service.OrderDetailsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@HsafRestPath("/api/px/orderDetails")
@Service("orderDetailsService")
@Slf4j
public class OrderDetailsServiceImpl implements OrderDetailsService {

    @Autowired
    private OrderDetailsBO orderDetailsBO;

    @Override
    public OrderDetailsDTO add(OrderDetailsDTO orderDetailsDTO) {
        log.warn("orderDetailsDTO:{}",orderDetailsDTO);
        return orderDetailsBO.add(orderDetailsDTO);
    }

    @Override
    public String delete(String id) {
        return orderDetailsBO.delete(id);
    }

    @Override
    public OrderDetailsDTO get(String id) {
        return orderDetailsBO.get(id);
    }

    @Override
    public String update(OrderDetailsDTO OrderDetailsDTO) {
        return orderDetailsBO.update(OrderDetailsDTO);
    }

    @Override
    public List<OrderDetailsDTO> getPage(int pageNo, int pageSize) {
        return orderDetailsBO.getPage(pageNo,pageSize);
    }
}
